package com.chap13;

/**
 * <p>
 * <code>Fibonacci2</code>
 * </p>
 *
 * @author junbao3
 * TODO
 * @date 2023-04-12 14:20
 * Copyright (C) 2021 IFlyTek. All rights reserved.
 */
public class Fibonacci2 {
    public static void main(String[] args) {
        int n = 100000;
        long[] array = new long[n+1];
        array[0]=0;
        array[1] =1;
        for (int i = 2; i <=n ; i++) {
            array[i] = array[i-1]+array[i-2];
        }
        System.out.println(array[n]);
    }
}
